Release 10.1A: OpenEdge Development:
Progress 4GL Handbook
Extending the example to create and display records
This chapter concludes with a comprehensive example of using dynamic queries, buffers, temp-tables, and browses. The final example is saved as
h-testDynTT.p.
![]()
To extend the current example to get some data into the temp-table and display it:
- Add a
HANDLEvariable for a dynamic query and some variables to display data in:
- After the
TEMP-TABLE-PREPAREmethod, capture theDEFAULT-BUFFER-HANDLEin a variable:
- Define a static
FOR EACHblock to populate the temp-table with Customer and SalesRep values for Customers in New Hampshire, as well as a unique sequence value:
- Create a dynamic query for the temp-table buffer, prepare it to iterate through all the records in the temp-table, and open it:
- Walk through the query’s result list and copy some fields from the temp-table into the variables you defined. Display the values in a frame:
In a more general-purpose procedure, you could create dynamic fill-ins for each of the fields you want to display and capture their format, label, and other attributes from the buffer fields of the temp-table.
- Run the procedure:
![]()
The primary index for the temp-table is the Sequence index, so the records come back in that order.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |